Skip to content

Comments

feat(occ): allow admins to clear account passwords#58042

Open
leftybournes wants to merge 1 commit intomasterfrom
feat/clear_password
Open

feat(occ): allow admins to clear account passwords#58042
leftybournes wants to merge 1 commit intomasterfrom
feat/clear_password

Conversation

@leftybournes
Copy link
Contributor

@leftybournes leftybournes commented Feb 4, 2026

Summary

This adds the --no-password option to occ user:resetpassword to allow admins to clear users' passwords through the command line.

Checklist

Signed-off-by: Kent Delante <kent.delante@proton.me>
@leftybournes leftybournes added 3. to review Waiting for reviews feature: occ pending documentation This pull request needs an associated documentation update labels Feb 19, 2026
@leftybournes leftybournes added this to the Nextcloud 34 milestone Feb 19, 2026
@leftybournes leftybournes marked this pull request as ready for review February 19, 2026 06:01
@leftybournes leftybournes requested a review from a team as a code owner February 19, 2026 06:01
@leftybournes leftybournes requested review from Altahrim, ArtificialOwl, come-nc and salmart-dev and removed request for a team February 19, 2026 06:01
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but what happens if a user has no password set?

@leftybournes
Copy link
Contributor Author

leftybournes commented Feb 19, 2026

LGTM, but what happens if a user has no password set?

Good point. I should add a check for that.

Edit: Answer: It unconditionally sets it to a blank string, and the password field gets a hash.

@leftybournes
Copy link
Contributor Author

LGTM, but what happens if a user has no password set?

So it seems like server is designed to generate a random password anyway if only an e-mail address is given when creating a user. I wonder if it's better to add a confirmation question and just empty the password regardless when confirmed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews feature: occ pending documentation This pull request needs an associated documentation update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants